<div class="modal" ng-controller="KisBpmAssignmentPopupCtrl" xmlns="http://www.w3.org/1999/html">
    <div class="modal-dialog modal-wide">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;
                </button>
                <h2 translate>PROPERTY.ASSIGNMENT.TITLE</h2>
            </div>

            <div class="modal-body">
                <div class="row row-no-gutter">
                    <div class="col-xs-6">
                        <div class="row row-no-gutter">
                            <div class="form-group">
                                <label>选人方式</label>
                                <select ng-model="assignmentType"
                                        class="form-control"
                                        ng-options="a.value as a.label for a in assignmentTypeOption"
                                        ng-change="assignmentChange(assignmentType)"
                                        placeholder="请选择选人方式">
                                    <option disabled selected style="display: none" value="">请选择选人方式</option>
                                    <option ng-for="item in assignmentTypeOption" value="item.value">{{item.label}}
                                    </option>
                                </select>
                            </div>
                        </div>

                        <div class="row row-no-gutter">
                            <!-- 根据具体角色/岗位/部门来进行选人 -->
                            <div class="form-group" ng-show="assignmentType === 1">
                                <label>组类型</label>
                                <div class="form-group">
                                    <select ng-model="groupType"
                                            class="form-control"
                                            ng-options="a.value as a.label for a in groupTypeOption"
                                            ng-change="groupTypeChange(groupType)"
                                            placeholder="请选择组类型">
                                        <option disabled selected style="display: none" value="">请选择组类型</option>
                                        <option ng-for="item in groupTypeOption" value="item.value">{{item.label}}
                                        </option>
                                    </select>
                                </div>
                                <label>角色/岗位/部门名称</label>
                                <div class="form-group">
                                    <select ng-model="detailType"
                                            class="form-control"
                                            ng-options="a.value as a.label for a in treeData"
                                            ng-change="detailTypeChange(detailType)"
                                            placeholder="请选择角色/岗位/部门名称">
                                        <option disabled selected style="display: none" value="">
                                            请选择角色/岗位/部门名称
                                        </option>
                                        <option ng-for="item in treeData" value="item.value">{{item.label}}
                                        </option>
                                    </select>
                                </div>
                            </div>

                            <!-- 根据提交人所属公司领导进行选择人员 -->
                            <div class="form-group" ng-show="assignmentType === 3">
                                <div class="form-group">
                                    <label>所属部门名称</label>
                                    <select ng-model="groupType"
                                            class="form-control"
                                            ng-options="a.value as a.label for a in treeData"
                                            ng-change="groupTypeChange(groupType)"
                                            placeholder="请选择所属部门名称">
                                        <option disabled selected style="display: none" value="">请选择所属部门名称
                                        </option>
                                        <option ng-for="item in treeData" value="item.value">{{item.label}}
                                        </option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label>职位名称</label>
                                    <select ng-model="detailType"
                                            class="form-control"
                                            ng-options="a.value as a.label for a in treeData"
                                            ng-change="detailTypeChange(detailType)"
                                            placeholder="请选择职位名称">
                                        <option disabled selected style="display: none" value="">请选择职位名称</option>
                                        <option ng-for="item in treeData" value="item.value">{{item.label}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label>{{selectTitle}}</label>
                            <div class="default-grid" ng-grid="gridOptions" ng-show="isCandidate"></div>
                            <div class="default-grid" ng-grid="gridOptions" ng-show="!isCandidate"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="modal-footer">
                <button ng-click="close()" class="btn btn-primary" translate>ACTION.CANCEL</button>
                <button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button>
            </div>
        </div>
    </div>
</div>

